package example.players;

import roshambo.Player;

public class DoContra implements Player {

    private int move;

    @Override
    public int play() {
        return move;
    }

    @Override
    public void receive(int result) {
        switch (result) {
            case PEDRA:
                move = PAPEL;
                break;
            case PAPEL:
                move = TESOURA;
                break;
            case TESOURA:
                move = PEDRA;
                break;
        }
    }

    @Override
    public void newGame(int games) {
        move = PEDRA;
    }

}
